package com.coder.qa.client;

import com.coder.qa.client.impl.BaseClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @BelongsProject:coder_parent
 * @BelongsPackage:com.coder.qa.client
 * @Author:linchong
 * @CreateTime:2019-01-18 21:42
 * @Description: 服务间的调用
 */
//fallback:如果出问题了，回来执行的具体的类
@FeignClient(value = "coder-base",fallback = BaseClientImpl.class)
public interface BaseClient {

    @RequestMapping(value = "/label/{labelId}", method = RequestMethod.GET)
    public Result findById(@PathVariable("labelId") String labelId);
}
